<script setup lang='ts'>
import Edit from './edit.vue'
import Show from './show.vue'

const type = ref<'edit' | 'view'>('view')
const showEdit = computed(() => {
    return unref(type) === 'edit'
})
function editform() {
    type.value = 'edit'
}
function submit() {
    type.value = 'view'
}
</script>

<template>
    <ElCard shadow="never">
        <div class="mb-20 text-16 font-700">
            企业信息
        </div>

        <Edit v-if="showEdit"
              @submit="submit"
        />

        <Show v-else
              @editform="editform"
        />
    </ElCard>
</template>
